<html>

	<head>
		<title>播放声音</title>
	</head>

	<body>
		<div id="div1"></div>
		<input type="button" value="立即" onclick="play_click(this,'http://www.zhuatu.com/crop/1.wav');">
		<div id="div2"></div>
		<script language="javascript">
			function play_click(sef, url) {
				var div = document.getElementById('div1');
				div.innerHTML = '<embed src="' + url + '" loop="0" autostart="true" hidden="true"></embed>';
				var emb = document.getElementsByTagName('EMBED')[0];
				if (emb) {
					/* 这里可以写成一个判断 wav 文件是否已加载完毕，以下采用setTimeout模拟一下 */
					div = document.getElementById('div2');
					div.innerHTML = 'loading: ' + emb.src;
					sef.disabled = true;
					setTimeout(function() {
						div.innerHTML = '';
					}, 1000);
				}
			}
		</script>
	</body>

</html>